<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:include page="/WEB-INF/templateFrontoffice/header.jsp"/>
<script src="<c:url value='/javascript/jquery.tablesorter.js'/>"></script>
<!-- <script src="<c:url value='/javascript/jquery.tablesorter.custom.js'/>"></script> -->
<script>
	$(document).ready(function(){$("#myTable").tablesorter({sortList:[[0,1]]});});
</script>
  <div id="container">
    <div id="top">
      <span id="arianne">
          <a href="<c:url value='/'/>">Accueil</a> > 
          <a href="<c:url value='/societe/liste'/>">Sociétés</a>
      </span>
      <br/>
      <div id="mainlarge">
        <h2>Liste des sociétés </h2>
        <p class="error">${error}</p>


        <table id="myTable" class="CSSTableGenerator a_black format_listeTransaction">
            <thead>
                <tr>
                    <th>
                        Nom société 
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th>
                    <th>
                        Secteur
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th>
                    <th style="width:150px">
                        Capitalisation
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th>
                </tr>
            </thead>
            <tbody>
                <c:forEach var="societe" items="${societes}" varStatus="status">
                <tr>
                    <td><a href="<c:url value='/societe?id=${societe.idEntreprise}'/>"><c:out value="${societe.nom}"/></a></td>
                    <td><c:out value="${societe.secteur}"/></td>
                    <td><fmt:formatNumber type="number" maxFractionDigits="0" value="${societe.capitalisation}" /> &euro;</td>
                </tr>
                </c:forEach>
            </tbody>
        </table>
        <br/>
      </div>
    <!--end bottom-->
  </div>
  </div>
<jsp:include page="/WEB-INF/templateFrontoffice/footer.jsp"/>